The invention relates to computer generated animation, and more specifically to synchronization of interactive animations (animations that are responsive to user input).
Computer animation is more compelling when it includes realistic interaction among the components in a graphics scene. This is especially true when the animated characters in a graphics scene are supposed to simulate life-like interaction. Consider the following scenario: during a short segment of an animated display, two characters are on-screen doing a vaudeville routine. They dance together for a while, then one of them stops, puts down his cane, and turns to the other, who is still dancing. He says, xe2x80x9cHey, Merlin! Did you hear the one about the cat who ate the paper?xe2x80x9d Merlin responds, xe2x80x9cNo, I haven""t heard that one.xe2x80x9d
Scenarios like this are at the heart of animation, yet it is difficult for application programs to synchronize the actions of characters so that they appear more life-like. Most current applications use a time-based scripting system, in which the precise times at which individual actions and gestures evolve in lock step with a clock. This method is very flexible and quite powerful. Unfortunately, it requires a great deal of attention to each frame, it is very time-consuming, and the resulting script is hard to read. These limitations affect the use and availability of animation to designers in the mass market. Since it is particularly difficult to express such scripts in string format, they are particularly unsuitable to the World Wide Web (the Web), over which most control information is transmitted as text.
So-called rapid prototyping languages (including the Microsoft Visual Basic (VB) and Borland Delphi prototyping languages) use a much more accessible form of scripting. These languages use textual command scripts to run procedures based on underlying controls. VB, in particular, represents its scripts as simple text files, which can be edited with the most basic of tools and are easy to read and write. Moreover, VBScript, a somewhat restricted form of VB, is already widely available as a scripting tool over the Web, and is naturally expressed in text.
While these rapid prototyping languages facilitate development of software applications and are well suited for Web site development, they do not provide the precise control over timing that multimedia scripts provide. Unfortunately, multimedia scripts are more difficult to use, particularly because they require complex time-based programming to synchronize animations.
The invention provides a method for synchronizing animations that addresses these and other drawbacks. The invention may be implemented in an animation server that provides synchronization services to client programs. The synchronization services are particularly well suited for scripted animations, i.e., animations that are controlled via a script. However, these synchronization services are also accessible to other types of application programs written in programming languages such as C, C++, and Java via an Application Programming Interface. The invention provides synchronization methods used to synchronize the playback and speech of two or more interactive animations that share the display. These animations are interactive in the sense that they respond to user input such as clicks of a mouse button or speech input via a speech recognition engine.
In one implementation of the invention, an animation system enables applications to request animation services and input/output services for interactive animations such as user interface characters. One specific form of this type of character is a non-rectangular animation that is superimposed over the windows of concurrently executing programs. Through the animation system""s input services, applications can specify the input commands that a character will be responsive to, including mouse input or speech via a speech recognition engine
Applications animate the characters by invoking commands to request actions such as playing an animation sequence or generating speech output from text. In response to these commands, the system schedules the actions for playback. In one implementation, the system maintains a queue for each character and schedules the actions in first-in, first-out order.
To synchronize actions of two or more characters, an application invokes a synchronization command of the animation system and specifies an action of a character that it wants to synchronize with another character. The way in which the system synchronizes the actions of the characters depends on the synchronization command. One type of command, called a wait command, synchronizes actions of different characters by halting a character until the specified action of another character has completed. Another type of command, called an interrupt, causes an interrupt to be scheduled for a character. When this interrupt is processed, the animation server halts (e.g., deletes from a queue) a specified action of another character. Using the events supported in the animation system, an application can program the system to notify it about the progress of an animation or about input from the user. This feature enables applications to synchronize actions of characters in response to events.
Applications can be written in the form of text-based scripts. These scripts control animations by making animation requests via textual script commands. Scripts can animate more than one character and synchronize the character""s actions via the synchronization commands summarized above. The script commands operate on character actions, rather than on a time-based scheme. This enables programmers to quickly write animation scripts involving interaction between two or more animations without requiring precise frame by frame control of the animations.
Further features and advantages of the invention will become apparent with reference to the following detailed description and accompanying drawings.